// 封装request工具
function request(url, data={}, method="GET"){
	return new Promise((resolve, reject) => {
		uni.request({
			url: 'http://localhost:3001' + url,
			method,
			data,
			success: (res) => {
				resolve(res.data)
			},
			fail: (error) => {
				reject(error)
			}
		})
	})
}
export default request;